import Toast from '../../miniprogram_npm/@vant/weapp/toast/toast'
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    list: {
      type: Array,
      value: []
    },
    
  },

  /**
   * 组件的初始数据
   */
  data: {
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 2000,
    duration: 500,
    typelist:[
      {
        type:1,
        bgpath:'/images/bg_type1.png',
        titletext:'附近',
        titletext1:'活动',
        btntext:'查看活动',
        destext:'精彩尽在身边',
        color:'#16C0A0',
        url:'/pages/index_active/index',
      },
      {
        type:1,
        bgpath:'/images/bg_type2.png',
        titletext:'青年',
        titletext1:'之家',
        btntext:'了解详情',
        destext:'青年活动阵地',
        color:'#F43B47',
        url:'/pages/index_youthhome/index',
      },
      {
        type:2,
        bgpath:'/images/bg_type3.png',
        titletext:'主题',
        titletext1:'馆',
        destext:'#爱国主义教育基地#',
        btntext:'',
        color:'#3989FE',
        url:'/pages/index_theme/index',
      },
      {
        type:2,
        bgpath:'/images/bg_type4.png',
        titletext:'活动',
        titletext1:'地图',
        destext:'#活动、阵地全掌握#',
        btntext:'',
        color:'#05CCD7',
        url:'/pages/map/index',
      },
    ]

  },

  /**
   * 组件的方法列表
   */
  methods: {
    gomenuPage(e) {
      let url = e.currentTarget.dataset['navurl'];
      wx.navigateTo({
        url: url
      })
    },
    navActiveDetail(e){
      wx.navigateTo({
        url: '/pages/index_active_detail/index?id=' + e.currentTarget.dataset.id,
      })

    }
  }
})